package com.yupi.cli.pattern;

/**
 * 关闭命令
 */
public class TurnOffCommand implements Command {
    Device device;

    /**
     * 绑定设备
     * @param device
     */
    public TurnOffCommand(Device device) {
        this.device = device;
    }

    /**
     * 调用绑定设备的关闭命令
     */
    public void execute(){
        device.turnOff();
    }
}
